package net.aiion.weave.spi.bytecode;

import java.lang.annotation.Annotation;
import java.util.Collection;

public interface BytecodeStore {
    void registerType(BytecodeType aBytecodeType);

    void registerClass(String aName, byte[] aBytes);

    BytecodeType findTypeByName(String aName);

    Class<?> findClassByName(String aName);

    Collection<BytecodeType> findTypesByInterfaceName(String aInterfaceName);

    Collection<BytecodeType> findTypesByInterfaceClass(Class<?> aInterfaceClass);

    Collection<Class<?>> findClassesByInterfaceName(String aInterfaceName);

    <T> Collection<Class<? extends T>> findClassesByInterfaceClass(Class<T> aInterfaceClass);

    Collection<BytecodeType> findTypesByAnnotationName(String aAnnotationName);

    Collection<BytecodeType> findTypesByAnnotationClass(Class<? extends Annotation> aAnnotationClass);

    Collection<Class<?>> findClassesByAnnotationName(String aAnnotationName);

    Collection<Class<?>> findClassesByAnnotationClass(Class<? extends Annotation> aAnnotationClass);
}
